/**
 * The first type of container. It can load different types of goods until it is
 * full.
 * 
 * @author Xi
 * 
 */
public class Container1 extends Container {

	public Container1(int capacity) {
		super(capacity);
	}

	@Override
	public void load(Goods goods) {
		try {
			loadGoods(goods);
		} catch (TransportException e) {
			e.printStackTrace();
		}
	}

	@Override
	public void unload() {
		if (!goodsList.isEmpty()) {
			Goods removedGoods = goodsList.remove(0); // remove the goods from
														// the container
			weight -= removedGoods.getWeight(); // change the container weight
			System.out.println("The goods is removed, goods weight: "
					+ removedGoods.getWeight() + " , goods type: "
					+ removedGoods.getType() + " , goods value: "
					+ removedGoods.getValue());
		}
	}

}
